<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/layouts/base.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
<title>权限列表</title>
<script src="${basePath}/static/admin/main/js/menu-list.js"></script>
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight" >
      <div class="row">
           <div class="col-sm-12">
               <div class="ibox float-e-margins">
                   <div class="ibox-title">
                       <h5>权限列表</h5>
                       <div class="ibox-tools">
                           <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                           <a class="close-link"><i class="fa fa-times"></i></a>
                       </div>
                   </div>
                   <div class="ibox-content">
                       <div class="row row-lg">
                           <div class="col-sm-12">
                               <div class="example-wrap">
                                   <div class="example">
                                   	<div id="toolbar" class="btn-group m-t-sm">
                                           <button type="button" class="btn btn-default"  title="添加菜单" onclick="member_show('添加','${basePath}/system/menu/add',null,'900',null)">
                                               <i class="glyphicon glyphicon-plus"></i>
                                           </button>
                                           <button type="button" class="btn btn-default"  title="刷新列表" onclick="javascript:window.location.reload()">
                                               <i class="glyphicon glyphicon-refresh"></i>
                                           </button>                                           
                                       </div>
                                       <table id="treetable" class="table table-striped table-hover table-success"
                                          data-toolbar="#toolbar">
                                       <thead>
                                       <tr>
                                           <th>菜单名称</th>
                                           <th>菜单路径</th>
                                           <th>操作</th>
                                       </tr>
                                       </thead>
                                       <tbody>
                                       	<c:forEach items="${menuList }" var="menu" varStatus="status">
	  										<tr id="${menu.id}" pId="${menu.parentId }" 
	  											<c:if test="${menu.childNum > 0}">hasChild="true"</c:if>
	  										>
									  		<td><span controller="true">${menu.menuName}</span></td>
									  		<td>${menu.menuUrl}</td>
									  		<td>
									  			<a class="edit m-l-sm text-warning" href="javascript:void(0)" onclick="member_show('编辑菜单','${basePath}/system/menu/update','${menu.id}','900',null)" title="编辑">
							                    	<i class="glyphicon glyphicon-edit"></i>
							                    </a>
							                    <a class="remove m-l-sm text-danger" href="javascript:void(0)" onclick="member_del(this, '${menu.id}')" title="删除">
							                    	<i class="glyphicon glyphicon-remove"></i>
							                    </a>
									  		</td>
										  	</tr>
								  		</c:forEach>
                                        </tbody>
                                    </table>
                                    </div>
                                </div>
                        	</div>
                    	</div>
                    </div>
                </div>
            </div>
    	</div>
    </div>
  </body>
</html>
